$(document).ready(
		function() {
			// 滚动加载
			var end = false;
			var page = 0;
			var loading = false; // 状态标记
			$('#div1').css('height', $(window).height() - 44);
			$('#div1').pullToRefresh();
			$('#div1').on("pull-to-refresh", function() {
				page = 0;
				end = false;
				loadData(true);
				$('#div1').pullToRefreshDone();
			});
			$('#div1').infinite().on("infinite", function() {
				loadData(false);
			});
			$('#div1').trigger('pull-to-refresh');
			function loadData(type) {
				if (loading)
					return false;
				if (end) {
					return false;
				}
				loading = true;
				$("#loading-div").show();
				$.ajax({
					url : appPath + '/money/fundflowlist.html',
					dataType : 'html',
					data : {
						"page" : page,
						"type" : $("#type").val(),
						"token" : $.cookie("token")
					},
					success : function(result) {
						if(result.indexOf("loginpage") > -1){
							location.href = appPath + "/member/login.html";
						}
						var over = $("#over").val();
						if (over) {
							end = true;
						} else {
							page = page + 1;
							if (type) {
								$("#content").html(result);
							} else {
								$("#content").append(result);
							}
						}
						$("#loading-div").hide();
						loading = false;
					},
					error : function(XMLHttpRequest, textStatus, errorThrown) {
						$.hideLoading();
						$("#loading-div").hide();
						$.alert("系统异常，请重试");
					}
				});
			}
		});